<html>
<head><meta charset="utf-8"><title>how does clippy do subtree syncs · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20clippy.20do.20subtree.20syncs.html">how does clippy do subtree syncs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="215621505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20clippy%20do%20subtree%20syncs/near/215621505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20clippy.20do.20subtree.20syncs.html#215621505">(Nov 04 2020 at 18:21)</a>:</h4>
<p>How does clippy do subtree syncs back from rust-lang/rust to rust-lang/rust-clippy? For cg_clif the following causes conflicts by all files changed in rust-lang/rust. Even when they haven't been changed in bjorn3/rustc_codegen_cranelift.</p>
<div class="codehilite" data-code-language="Bash"><pre><span></span><code><span class="nv">cg_clif</span><span class="o">=</span><span class="k">$(</span><span class="nb">pwd</span><span class="k">)</span>
<span class="nb">pushd</span> ../rust
git pull origin master
<span class="nv">rust_vers</span><span class="o">=</span><span class="k">$(</span>git rev-parse HEAD<span class="k">)</span>
git subtree push --prefix<span class="o">=</span>compiler/rustc_codegen_cranelift/ <span class="nv">$cg_clif</span> sync_from_rust
<span class="nb">popd</span>
<span class="c1">#git checkout sync_from_rust</span>
<span class="c1">#git merge master</span>
git checkout master
git merge sync_from_rust -m <span class="s2">"Sync from rust </span><span class="nv">$rust_vers</span><span class="s2">"</span>
git branch -d sync_from_rust
</code></pre></div>
<p>cc <span class="user-mention" data-user-id="132040">@Manish Goregaokar</span></p>



<a name="215621589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20clippy%20do%20subtree%20syncs/near/215621589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Manish Goregaokar <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20clippy.20do.20subtree.20syncs.html#215621589">(Nov 04 2020 at 18:22)</a>:</h4>
<p><span class="user-mention" data-user-id="264664">@flip1995</span> probably can help, i haven't done a sync in a while</p>



<a name="215621905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20clippy%20do%20subtree%20syncs/near/215621905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20clippy.20do.20subtree.20syncs.html#215621905">(Nov 04 2020 at 18:25)</a>:</h4>
<p>For the record <a href="https://github.com/rust-lang/rust/issues/77227">#77227</a> is the PR that changed <code>compiler/rustc_codegen_cranelift</code>.</p>



<a name="215707336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20clippy%20do%20subtree%20syncs/near/215707336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20clippy.20do.20subtree.20syncs.html#215707336">(Nov 05 2020 at 12:58)</a>:</h4>
<p>This happens on <code>subtree push</code>s, after  a <code>subtree pull</code>, since the <code>pull</code> merge commit is again pulled in. You can do a <code>push</code> directly following a <code>pull</code> (without committing to the external repo in between), to prevent those merge commits. </p>
<p>But since it is too late for this now, we have to fix this another way:</p>
<div class="codehilite"><pre><span></span><code>git checkout sync_from_rust
git merge master
</code></pre></div>
<p>After that, you can merge it back into master. (+rust-toolchain update)</p>



<a name="215714580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/how%20does%20clippy%20do%20subtree%20syncs/near/215714580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/how.20does.20clippy.20do.20subtree.20syncs.html#215714580">(Nov 05 2020 at 14:00)</a>:</h4>
<p>Thanks. I will try that.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>